@use 'queries' as *;

/////////////////////////////
// HEADINGS
/////////////////////////////

@mixin jumbo {
  margin: 50px 0;
  font-size: 132px;
  line-height: 1;
  font-weight: normal;

  @include extra-large-break {
    font-size: 96px;
  }

  @include large-break {
    font-size: 84px;
  }

  @include mid-break {
    font-size: 70px;
  }

  @include small-break {
    margin: 24px 0;
    font-size: 36px;
    line-height: 42px;
  }
}

@mixin h1 {
  margin: 3rem 0 2.4rem;
  font-size: 4rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;

  @include small-break {
    font-size: 2.5rem;
  }

  & code {
    font-size: inherit;
  }
}

@mixin h2 {
  margin: 2.4rem 0 1.8rem;
  font-size: 2.5rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;

  @include large-break {
    font-size: 3rem;
  }

  @include small-break {
    font-size: 1.75rem;
  }
  & code {
    font-size: inherit;
  }
}

@mixin h3 {
  margin: 1.8rem 0 1.2rem;
  font-size: 2rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;

  @include small-break {
    font-size: 1.5rem;
  }
  & code {
    font-size: inherit;
  }
}

@mixin h4 {
  margin: 1.2rem 0;
  font-size: 1.4rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.05em;

  @include large-break {
    font-size: 1.5rem;
  }

  @include small-break {
    font-size: 1.125rem;
  }
  & code {
    font-size: inherit;
  }
}

@mixin h5 {
  margin: 1.2rem 0;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.05rem;

  @include large-break {
    font-size: 1.25rem;
  }

  @include small-break {
    font-size: 1rem;
  }
  & code {
    font-size: inherit;
  }
}

@mixin h6 {
  margin: 1.2rem 0;
  font-size: 13px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;

  @include large-break {
    font-size: 12px;
  }
  & code {
    font-size: inherit;
  }
}

/////////////////////////////
// TYPE STYLES
/////////////////////////////

@mixin body {
  font-size: var(--font-body-size);
  line-height: 1.4;
}

@mixin small {
  & {
    letter-spacing: 0;
    font-size: 16px;
    line-height: 20px;

    @include extra-large-break {
      font-size: 15px;
      line-height: 18px;
    }
  }
}

@mixin large-body {
  font-size: 24px;
  line-height: 1.2em;
  letter-spacing: -0.04em;

  @include extra-large-break {
    font-size: 22px;
  }
}

@mixin code {
  font-family: var(--font-geist-mono);
  font-size: calc(var(--font-body-size) - 4px);
  letter-spacing: 0;

  @include extra-large-break {
    font-size: calc(var(--font-body-size) - 2px);
  }
}

@mixin label {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  margin: 0;
  border-radius: 0.25rem;
  border: 1px solid var(--theme-success-200);
  background-color: var(--theme-success-50);
  color: var(--theme-success-650);
  line-height: 1.2;
  font-weight: 400;

  @include mid-break {
    font-size: 1rem;
  }

  @include small-break {
    font-size: 1rem;
  }
}

@mixin uppercaseLabel {
  color: var(--theme-elevation-900);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 400;
  line-height: 100%;
  letter-spacing: 2.75px;
  text-transform: uppercase;
  margin: 0 0 0.75rem 0;
}
